<?php
class  Front_Model_DbTable_Jobcategory  extends  Zend_Db_Table_Abstract
{
    protected $_name = 'job_category' ;
    
   	public function getCategoryByTaxonomyId($taxonomyId){
   		try {
    		$this->_db->setFetchMode(Zend_Db::FETCH_ASSOC);
    		$sql = "SELECT * FROM `job_category`
					WHERE id in(
					Select id_category from job_category_taxonomy
					where id_taxonomy  = ?)";
    		return $this->_db->fetchAll ( $sql, array($taxonomyId) );
    	} catch ( Exception $ex ) {
    		Echo ("<br /> Can not get category by taxonomy id, error: " . $ex->getMessage ());
    		exit ();
    	}
   	}
    
}
